﻿using Microsoft.EntityFrameworkCore.Migrations;

#nullable disable

namespace DFGK_WMS.Context.Migrations
{
    public partial class 增加库存流水表 : Migration
    {
        protected override void Up(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.CreateTable(
                name: "T_InventoryLog",
                columns: table => new
                {
                    Id = table.Column<long>(type: "bigint", nullable: false),
                    SourceType = table.Column<int>(type: "int", nullable: true),
                    SourceSn = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    WarehouseId = table.Column<long>(type: "bigint", nullable: true),
                    WarehouseName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    AreaId = table.Column<long>(type: "bigint", nullable: true),
                    AreaName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    LocationCode = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    PalletBarcode = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    MaterialId = table.Column<long>(type: "bigint", nullable: true),
                    MaterialCode = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    MaterialName = table.Column<string>(type: "nvarchar(30)", maxLength: 30, nullable: true),
                    BatchNo = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    StartQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    ChangeQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    EndQty = table.Column<decimal>(type: "decimal(18,2)", nullable: true),
                    BaseUnitId = table.Column<long>(type: "bigint", nullable: true),
                    BaseUnitName = table.Column<string>(type: "nvarchar(20)", maxLength: 20, nullable: true),
                    Remark = table.Column<string>(type: "nvarchar(100)", maxLength: 100, nullable: true)
                },
                constraints: table =>
                {
                    table.PrimaryKey("PK_T_InventoryLog", x => x.Id);
                });
        }

        protected override void Down(MigrationBuilder migrationBuilder)
        {
            migrationBuilder.DropTable(
                name: "T_InventoryLog");
        }
    }
}
